<?php

/* 已经支付订单商品 report_rec */
class ReportrecModel extends BaseModel
{
    var $table  = 'report_rec';
    var $alias  = 'order_g';
    var $prikey = 'id';
    var $_name  = 'reportrec';
    var $_relation = array(
        // 一个订单商品只能属于一个订单
        'belongs_to_report_order' => array(
            'model'         => 'order',
            'type'          => BELONGS_TO,
            'refer_key' => 'order_id',
            'foreign_key' => 'order_id',
            'reverse'       => 'has_reportrec',
        ),

    );
}

?>